package cn.donting.jme.edit.ui.scenetree.meum;

import cn.donting.jme.edit.ui.scenetree.ClipBoard;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.ActionEvent;
import javafx.event.Event;
import javafx.event.EventHandler;
import javafx.scene.control.MenuItem;
import javafx.scene.input.MouseButton;
import javafx.scene.input.MouseEvent;

public abstract class AbsTreeMenuItem extends MenuItem implements EventHandler<ActionEvent> {
    public AbsTreeMenuItem(String text) {
        super(text);
        setOnAction(this);
    }


    public abstract boolean isAvailable(ClipBoard clipBoard);
    @Override
    public final   void handle(ActionEvent event) {
        action(ClipBoard.getInstance());
    }

    public abstract void action(ClipBoard clipBoard);
}
